function [ Xu,Yu,Xv,Yv,dimXu,dimYu,dimXv,dimYv ] = getXuXv( Xp,Yp,Hxp,Hyp )

dimX = size (Xp,2);
dimY = size (Yp,2);

dimXu = dimX+1;
dimYu = dimY;
dimXv = dimX;
dimYv = dimY+1;

Xu = zeros (dimXu,1);
Yu = zeros (dimYu,1);
Xv = zeros (dimXv,1);
Yv = zeros (dimYv,1);

Xu(1) = -Hxp(1);
for i=2:dimXu
    Xu (i) = Xp(i-1) + 0.5*Hxp(i-1);
end

for j=1:dimYu
    Yu (j) = Yp(j);
end

for i=1:dimXv
    Xv (i) = Xp(i);
end

Yv(1) = -Hyp(1);
for j=2:dimYv
    Yv (j) = Yp(j-1) + 0.5*Hyp(j-1);
end

end

